using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using CustomInspector;
using System;

[Serializable]
public class ExtraTag : SingletonPatternMonoBase<ExtraTag>
{
    [SerializeField]
    public ExtraTags extraTags;

    private void Awake()
    {
        GameObjectController.Instance.haveExtraTag.Add(GetComponent<ExtraTag>());
        if (extraTags.isAnimator)
        {
            AnimatorController.Instance.animatorsList.Add(GetComponent<Animator>());
        }
    }
    private void OnEnable()
    {
        if (extraTags.haveInitPos)
        {
            transform.localPosition = extraTags.initPos; 
        }
    }


    public void SetNowLocalPosition(Vector3 vector3)
    {
        vector3 = transform.localPosition;
    }
}

[Serializable]
public class ExtraTags
{
    public bool isAnimator = false;
    public bool haveInitPos = false;
    [ShowIf(BoolOperator.And, nameof(haveInitPos), style = DisabledStyle.Invisible, indent = 0)]
    
    [CopyPaste]public Vector3 initPos;

    
}